package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.model.user.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * 用户信息查询的feign接口
 *
 * @author Taeyang
 * @date 2025/4/29
 */
@FeignClient(name = "service-user", path = "/client/user/userInfo", contextId = "UserClientFeign")
public interface UserClientFeign {

    /**
     * 查询用户的详细信息
     *
     * @param userId
     * @return
     */
    @GetMapping("/getUserInfo/{userId}")
    public UserInfo getUserInfo(@PathVariable("userId") Long userId);

    /**
     * 查询用户购买专辑的状态
     *
     * @param userId
     * @param albumId
     * @return
     */
    @GetMapping("/getUserAlbumPaidStatus/{userId}/{albumId}")
    public Boolean getUserAlbumPaidStatus(@PathVariable("userId") Long userId, @PathVariable("albumId") Long albumId);

    /**
     * 查询用户购买的专辑的声音map集合
     * @param userId
     * @param albumId
     * @return
     */
    @GetMapping("/getUserTrackPaidMap/{userId}/{albumId}")
    public Map<String, Object> getUserTrackPaidMap(@PathVariable("userId") Long userId, @PathVariable("albumId") Long albumId);
}

